package com.qf.common.core.config;




import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;


/**
 * @author zdl
 * @date 2025/3/24
 */
@Configuration
public class ThreadPoolConfig {
    @Bean(name = "taskExecutor")
    public Executor taskExecutor() {
        return new ThreadPoolExecutor(10, 20, 60L, TimeUnit.SECONDS,
                new ArrayBlockingQueue<>(100));
    }
}
